<template>
    <!-- https://segmentfault.com/a/1190000009404727 -->

    <!-- <div class="subpage-contain">
        <span class="in-sub" @click="show = true">Index</span>
        <sub-page :show.sync="show"></sub-page>
    </div> -->
    <div class="subpage-contain">
        <span class="in-sub" @click="$store.state.show = true">Index</span>
        <sub-page :show.sync="show"></sub-page>
    </div>
    
</template>
<script>
import SubPage from './SubPage'
export default {
    components:{
        'sub-page': SubPage
    },
    data(){
        return {
            show: false
        }
    }
}
</script>
<style lang="less">
.subpage-contain{
    margin: 30px;
    .in-sub{
        margin: 20px 0 ;
        display: inline-block;
        cursor: pointer;
        &:hover{
            color: red;
        }
    }
}

</style>

